/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package transervfx.Logica;

import java.util.List;
import transervfx.Dato.DAO.GuiaTramitesDAO;
import transervfx.Dato.Entidad.GuiaTramite;

/**
 *
 * @author meli
 */
public class GestorGuiaTramites {

    private static GestorGuiaTramites INSTANCE = null;

    public GestorGuiaTramites() {
    }

    private synchronized static void createInstance() {
        if (INSTANCE == null) {
            INSTANCE = new GestorGuiaTramites();
        }
    }

    public static GestorGuiaTramites getInstance() {
        if (INSTANCE == null) {
            createInstance();
        }
        return INSTANCE;
    }

    public void guardarGuiaTramites(GuiaTramite gt) {
        GuiaTramitesDAO.getInstance().persist(gt);
    }

    public void actualizarGuiaTramites(GuiaTramite gt) {
        GuiaTramitesDAO.getInstance().update(gt);
    }

    public void eliminarGuiaTramites(GuiaTramite gt) {
        GuiaTramitesDAO.getInstance().remove(gt);
    }

   
    public List<GuiaTramite> findAll() {
        return GuiaTramitesDAO.getInstance().findAll();
    }


   
}
